-- arena
-- created by panyl
-- 地牢格子：竞技场

return {
    restoreGrid = function(grid, info)
        -- TODO
    end,

    -- 自动战斗
    autoFight = function(grid)
        if ArenaM.canEnterArena() and
            not ArenaM.hasEverFlee(DungeonM.currentLayer()) then
            -- 尝试进入
            local pos = grid:getPos();
            local unrealId = grid.unrealId;
            DungeonActionM.go("start_unreal", pos, unrealId);
            return true;
        end
        return false;
    end
};